package com.mallcloud.mall.mall.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.mallcloud.mall.common.core.constant.enums.app.PointsProductRedeemEnum;
import com.mallcloud.mall.common.core.util.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@ApiModel(value = "MallPointsProductRedeemRecordModel", description = "积分商品兑换记录")
@Data
@TableName("JFDHSPLIST")
public class MallPointsProductRedeemRecordModel implements Serializable {
    private static final long serialVersionUID = 1L;

	@JsonSerialize(using = ToStringSerializer.class)
	@NotNull(message = "ID为空", groups = {ValidGroup.Update.class})
    @TableId(value = "IERCODE", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value="兑换记录编码，主键")
    private Long id;

    @ApiModelProperty(value="兑换商品编码")
	@TableField("IERICCODE")
    private String pointsProductCode;

    @ApiModelProperty(value="兑换金额")
	@TableField("IERMONEY")
    private BigDecimal redeemMoney;

    @ApiModelProperty(value="兑换积分")
	@TableField("IERINTEGRAL")
    private Long redeemPoints;

    @ApiModelProperty(value="兑换数量")
	@TableField("IERAMOUNT")
    private Integer redeemAmount;

    @ApiModelProperty(value="兑换总金额")
	@TableField("IERTOTALMONEY")
    private BigDecimal redeemTotalMoney;

    @ApiModelProperty(value="兑换总积分")
	@TableField("IERTOTALINTEGRAL")
    private BigDecimal redeemTotalPoints;

    @ApiModelProperty(value="兑换人手机号")
	@TableField("IERMOBILE")
    private String redeemerPhone;

    @ApiModelProperty(value="兑换人会员卡号")
	@TableField("IERCARDNO")
    private String redeemerPhoneCardNo;

    @ApiModelProperty(value="兑换日期")
	@TableField("IERDATETIME")
    private Date redeemDateTime;

	/**
	 * {@link PointsProductRedeemEnum.RedeemStatusEnum}
	 */
	@ApiModelProperty(value="兑换状态")
	@TableField("IERSTATUS")
    private String redeemStatus;

    @ApiModelProperty(value="兑换状态变更时间")
	@TableField("IERSTATUSDATE")
    private Date redeemStatusDate;

    @ApiModelProperty(value="兑换状态变更说明")
	@TableField("IERSTATUSCONTENT")
    private String redeemStatusDec;

    @ApiModelProperty(value="商品类型")
	@TableField("SPLX")
    private String productType;

    @ApiModelProperty(value="所属商场编码")
	@TableField("IERMALLCODE")
    private String storeNo;

}
